from appium.webdriver.common.mobileby import MobileBy
from appium.webdriver.webdriver import WebDriver

from test_lubo.app_PO4.page.base_page import BasePage
from test_lubo.app_PO4.page.contact_list_page import ContactListPage


class MainPage(BasePage):
    _contact_element = (MobileBy.XPATH, "//*[@text='通讯录']")
    def goto_contactlist(self):
        #点击通讯录，跳转到通讯录页面
        self.find_and_click(*self._contact_element)
        # self.driver.find_element(MobileBy.XPATH, "//*[@text='通讯录']").click()
        return ContactListPage(self.driver)